package com.wxmit.module.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wxmit.module.system.domain.SysOperateLog;
import com.wxmit.module.system.domain.dto.SysOperateLogSearchDTO;
import com.wxmit.module.system.mapper.SysOperateLogMapper;
import com.wxmit.module.system.service.ISysOperateLogService;
import com.wxmit.system.base.core.ShushanPage;
import com.wxmit.system.base.core.ShushanServiceImpl;
import com.wxmit.system.base.domain.PageDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 操作日志记录Service业务层处理
 * 
 * @author huangxiong
 * @date 2022-08-08
 */
@Service
public class SysOperateLogServiceImpl extends ShushanServiceImpl<SysOperateLogMapper,SysOperateLog>  implements ISysOperateLogService
{
    @Autowired
    private SysOperateLogMapper sysOperateLogMapper;



    @Override
    public List<String> moduleList() {

        return sysOperateLogMapper.moduleList();
    }

    @Override
    public IPage<SysOperateLog> listPageBySearchDTO(PageDTO<SysOperateLogSearchDTO> pageDTO) {
        ShushanPage page = pageDTO.getPage();
        page.setUnderlineCaseOrderIfNull(SysOperateLog.Fields.operTime,false);
        return sysOperateLogMapper.listPage(page,pageDTO.getSearchData());
    }


}